﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta name="keywords" content="jCute,netnr" />
    <meta name="description" content="jCute JavaScript Library,netnr" />

    <title>jCute JavaScript Library</title>

    <link rel="shortcut icon" href="favicon.ico" type="image/x-icon" />
    <link href="/app/md/dist/netnrmd.css" rel="stylesheet" />

    <style>
        .markdown-body {
            max-width: 60em;
            margin: auto;
            zoom: 1.2;
        }
    </style>
</head>
<body>
    <div class="markdown-body">
        <h1 id="toc_0">jCute</h1>
        <p>JavaScript Library</p>
        <h3 id="toc_1"><a href="view.html?jcute.all.js">jCute.all.js</a></h3>
        <h1 id="toc_2">Module</h1>
        <h3 id="toc_3"><a href="view.html?jcute.ajax.js">jCute.ajax.js</a></h3>
<pre><code class="hljs language-js"><span class="hljs-comment">/**
 * ajax请求
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">JQuery.AjaxSettings</span>} settings 类似于jQuery传参
 * 
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} url 请求地址
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} type 请求方式，默认：GET
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">boolean</span>} async 异步请求，默认：true
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} data 发送内容，字符串 | 键值对 | FormData
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} contentType 内容编码类型，默认：application/x-www-form-urlencoded
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} dataType 返回类型：json/xml/text，默认：text
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} headers 消息头，键值对
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} timeout 超时，单位：毫秒，默认设置超时
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} progress function(p){ }，FormData上传进度回调方法 p：0-100
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} success function(data,status,xhr){ }，成功回调方法，data：返回数据，
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} error function(xhr,status){ }，错误回调方法
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} complete:function(xhr,status){ }，完成回调
 */</span>
jCute.<span class="hljs-title function_">ajax</span>(settings)
</code></pre>
        <h3 id="toc_4"><a href="view.html?jcute.convert.js">jCute.convert.js</a></h3>
<pre><code class="hljs language-js"><span class="hljs-comment">/**
 * Unicode编码
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} str 字符串
 */</span>
jCute.<span class="hljs-title function_">toUnicode</span>(str)

<span class="hljs-comment">/**
 * Unicode解码
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} str 字符串
 */</span>
jCute.<span class="hljs-title function_">toUnicodeUn</span>(str)

<span class="hljs-comment">/**
 * Ascii编码
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} str 字符串
 */</span>
jCute.<span class="hljs-title function_">toAscii</span>(str)

<span class="hljs-comment">/**
 * Ascii解码
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} str 字符串
 */</span>
jCute.<span class="hljs-title function_">toAsciiUn</span>(str)
</code></pre>
        <h3 id="toc_5"><a href="view.html?jcute.cookie.js">jCute.cookie.js</a></h3>
<pre><code class="hljs language-js"><span class="hljs-comment">/**
 * Cookie获取、设置、删除
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} key 键
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} value 值
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">number</span>} time 过期时间（默认不指定过期时间），单位：毫秒，小于0删除
 */</span>
jCute.<span class="hljs-title function_">cookie</span>(key, value, time)
</code></pre>
        <h3 id="toc_6"><a href="view.html?jcute.load.js">jCute.load.js</a></h3>
<pre><code class="hljs language-js"><span class="hljs-comment">/**
 * 载入js脚本，并回调
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} src js脚本路径
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">function</span>} success 载入成功回调方法
 */</span>
jCute.<span class="hljs-title function_">getScript</span>(src, success)

<span class="hljs-comment">/**
 * 载入css样式
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} href css样式路径
 */</span>
jCute.<span class="hljs-title function_">getStyle</span>(href)
</code></pre>
        <h3 id="toc_7"><a href="view.html?jcute.support.js">jCute.support.js</a></h3>
<pre><code class="hljs language-js"><span class="hljs-comment">/** 
 * IE8- 
 */</span>
jCute.<span class="hljs-title function_">oldIE</span>()

<span class="hljs-comment">/**
 * 移除空字符
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} str 字符串
 */</span>
jCute.<span class="hljs-title function_">trim</span>(str)

<span class="hljs-comment">/**
 * event
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">event</span>} e 事件流
 */</span>
jCute.<span class="hljs-title function_">event</span>(e)

<span class="hljs-comment">/**
 * target
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">event</span>} e 事件流
 */</span>
jCute.<span class="hljs-title function_">target</span>(e)

<span class="hljs-comment">/**
 * 阻止事件冒泡
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">event</span>} e 事件流
 */</span>
jCute.<span class="hljs-title function_">stopEvent</span>(e)

<span class="hljs-comment">/**
 * 阻止浏览器默认行为
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">event</span>} e 事件流
 */</span>
jCute.<span class="hljs-title function_">stopDefault</span>(e)

<span class="hljs-comment">/**
 * 按键ASCII值
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">event</span>} e 事件流
 */</span>
jCute.<span class="hljs-title function_">key</span>(e)

<span class="hljs-comment">/**
 * 检测类型
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">any</span>} obj 对象
 */</span>
jCute.<span class="hljs-title function_">type</span>(obj)
</code></pre>
        <h3 id="toc_8"><a href="view.html?jcute.xml.js">jCute.xml.js</a></h3>
<pre><code class="hljs language-js"><span class="hljs-comment">/**
 * 解析字符串为xml
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">string</span>} data 字符串
 */</span>
jCute.<span class="hljs-title function_">parseXML</span>(data)

<span class="hljs-comment">/**
 * XML转字符串
 * <span class="hljs-doctag">@param</span> {<span class="hljs-type">object</span>} xmlDoc XML对象
 */</span>
jCute.<span class="hljs-title class_">XMLSerializer</span>(xmlDoc)
</code></pre>
    </div>
    <script src="src/jCute.all.js"></script>

    <script>
        //浏览器变更主题
        if (window.matchMedia('(prefers-color-scheme: dark)').matches) {
            document.documentElement.classList.add('netnrmd-dark')
        }
        window.matchMedia('(prefers-color-scheme: dark)').addEventListener('change', (e) => {
            document.documentElement.classList.remove('netnrmd-light', 'netnrmd-dark')
            if (e.matches) {
                document.documentElement.classList.add('netnrmd-dark')
            } else {
                document.documentElement.classList.add('netnrmd-light')
            }
        });
    </script>
</body>
</html>